import Vue from "vue";
import Router from "vue-router";
import HelloWorld from "@/components/HelloWorld";

Vue.use(Router);

export default new Router({
  routes: [
    {
      path: "/",
      name: "Login",
      component: () => import("@/pages/login.vue"),
    },
    {
      path: "/index",
      name: "Index",
      component: () => import("@/pages/index.vue"),
      children: [
        {
          path: "/welcome",
          name: "Welcome",
          component: () => import("@/pages/welcome.vue"),
        },
        {
          path: "/mange/showList",
          name: "mangeShowList",
          component: () => import("@/pages/mange/showList.vue"),
        },
        {
          path: "/mange/artShowList",
          name: "mangeArtShowList",
          component: () => import("@/pages/mange/artShowList.vue"),
        },
        {
          path: "/mange/orderActiveList",
          name: "mangeOrderActiveList",
          component: () => import("@/pages/mange/orderActiveList.vue"),
        },
        {
          path: "/mange/orderVisitList",
          name: "mangeOrderVisitList",
          component: () => import("@/pages/mange/orderVisitList.vue"),
        },
        {
          path: "/mange/userList",
          name: "mangeUserList",
          component: () => import("@/pages/mange/userList.vue"),
        },
        {
          path: "/mange/way_mange",
          name: "mangeWayMange",
          component: () => import("@/pages/mange/way_mange.vue"),
          meta: {
            auth: true,
            keepAlive: true,
          },
        },
        {
          path: "/mange/wallList",
          name: "mangeList",
          component: () => import("@/pages/mange/wallList.vue"),
          meta: {
            auth: true,
            keepAlive: true,
          },
        },
        {
          path: "/mange/task_detail",
          name: "mangetaskDetail",
          component: () => import("@/pages/mange/task_detail.vue"),
          meta: {
            auth: true,
            keepAlive: false,
          },
        },
        {
          path: "/mange/way_detail",
          name: "mangeWayDetail",
          component: () => import("@/pages/mange/way_detail.vue"),
          meta: {
            auth: true,
            keepAlive: false,
          },
        },
        {
          path: "/mange/active_detail",
          name: "mangeActiveDetail",
          component: () => import("@/pages/mange/active_detail.vue"),
          meta: {
            auth: true,
            keepAlive: false,
          },
        },
        {
          path: "/basic/information",
          name: "basicInformation",
          component: () => import("@/pages/basic/information.vue"),
          meta: {
            auth: true,
            keepAlive: true,
          },
        },
        {
          path: "/basic/accountNember",
          name: "basicAccountNember",
          component: () => import("@/pages/basic/accountNember.vue"),
          meta: {
            auth: true,
            keepAlive: true,
          },
        },
        {
          path: "/factory/task_list",
          name: "factoryTaskList",
          component: () => import("@/pages/factory/task_list.vue"),
          meta: {
            auth: true,
            keepAlive: false,
          },
        },
        {
          path: "/factory/driver",
          name: "factoryDriver",
          component: () => import("@/pages/factory/driver.vue"),
          meta: {
            auth: true,
            keepAlive: true,
          },
        },
        {
          path: "/system/framework",
          name: "systemFramework",
          component: () => import("@/pages/system/framework.vue"),
          meta: {
            auth: true,
            keepAlive: true,
          },
        },
        {
          path: "/system/menu",
          name: "systemMenu",
          component: () => import("@/pages/system/menu.vue"),
          meta: {
            auth: true,
            keepAlive: true,
          },
        },
        {
          path: "/system/number_admin",
          name: "systemNumberAdmin",
          component: () => import("@/pages/system/number_admin.vue"),
          meta: {
            auth: true,
            keepAlive: true,
          },
        },
        {
          path: "/system/role",
          name: "systemRole",
          component: () => import("@/pages/system/role.vue"),
          meta: {
            auth: true,
            keepAlive: true,
          },
        },
        {
          path: "/system/personal",
          name: "personal",
          component: () => import("@/pages/system//personal.vue"),
          meta: {
            auth: true,
            keepAlive: false,
          },
        },
        {
          path: "/runMange/news",
          name: "runMangeNews",
          component: () => import("@/pages/runMange/news.vue"),
          meta: {
            auth: true,
            keepAlive: true,
          },
        },
        {
          path: "/runMange/violation",
          name: "runMangeViolation",
          component: () => import("@/pages/runMange/violation.vue"),
          meta: {
            auth: true,
            keepAlive: false,
          },
        },
        {
          path: "/runMange/violation_Detail",
          name: "runMangeDetail",
          component: () => import("@/pages/runMange/violation_Detail.vue"),
          meta: {
            auth: true,
            keepAlive: false,
          },
        },
        {
          path: "/runMange/warehouse_Driver",
          name: "warehouseDriver",
          component: () => import("@/pages/runMange/warehouse_Driver.vue"),
          meta: {
            auth: true,
            keepAlive: false,
          },
        },
      ],
    },
  ],
});
